#dkrs<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ page isELIgnored="false" %>
<script src="http://libs.baidu.com/jquery/2.1.4/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style type="text/css">
    </style>
    <title>打卡</title>
    <meta http-equiv="content-type" content="text/html;charset=gb2312">
    <!--把下面代码加到<head>与</head>之间-->
    <link rel="stylesheet" type="text/css" href="resources/css/tableDK.css" />
    <style type="text/css">
        *{
            margin: 0px;
            padding: 0px;
        }
        html{
            overflow-x:hidden;
            overflow-y:hidden;
        }
        body{
            background-color: #F4F4F4;

        }
        #boxmsg a{
            display:block;
            font-size:12px;
            color:#09F;
            text-decoration:none;
            text-align:center;
            padding-top:12px;
            background:#ededed;
            width:48px;
            height:37px;
            position:absolute;
            top:13px;
            right:15px;
            z-index:9999;
        }

        .btm button{
            display:block;
            width: 70px;
            height: 35px;
            background-color:#CCCCCC;
            border-radius: 5px;  /* 按键弧度*/
            line-height:18px;
            white-space:nowrap;
            text-align:center;
        }

        /*主题颜色
        #0FF=今日颜色;
        #0099FF=日历主题颜色;
        */

        #dv{
            width: 100%;
            height: 345px;
            background:#fff;
            position:absolute;
            top: 222px;
        }

        #dkrs{
            width: 620px;
            height: 200px;
            background:#fff;
            position:absolute;
            left: 0px;
            top: 0px;
            overflow: hidden;
            text-align: center;
        }
        #sydk{
            width: 455px;
            height: 200px;
            background: #fff;
            position: absolute;
            left: 650px;
            top: 0px;
        }
        #cq{
            position: absolute;
            top:40px;
            left: 80px;
            color: darkolivegreen;
        }
        #wcq{
            position: absolute;
            top:40px;
            right: 96px;
            color: orange;
        }
        #z0{
            position: absolute;
            top:154px;
            left: 70px;
            font-family: "宋体";
            color: darkolivegreen;
        }
        #z1{
            position: absolute;
            top:154px;
            right: 70px;
            font-family: "宋体";
            color: orange;
        }
        #weekimg{
            height: 70px;
            width: 83px;
            border-radius: 50%;
        }
        #tx{
            position: absolute;
            top: 40px;
            text-align: left;
        }
    </style>
    <script language="JavaScript">
        function ks(){return true;}
        window.onerror=ks;
    </script>

    <script>
        var d=new Date();
        var weekday=new Array(7);
        weekday[0]="resources/img/1.jpg";
        weekday[1]="resources/img/2.jpg";
        weekday[2]="resources/img/2.jpg";
        weekday[3]="resources/img/1.jpg";
        weekday[4]="resources/img/2.jpg";
        weekday[5]="resources/img/1.jpg";
        weekday[6]="resources/img/1.jpg";
        weekday[7]="resources/img/1.jpg";
        weekday[8]="resources/img/1.jpg";
        weekday[9]="resources/img/2.jpg";
        weekday[10]="resources/img/2.jpg";
        weekday[11]="resources/img/2.jpg";
        weekday[12]="resources/img/1.jpg";
        weekday[13]="resources/img/2.jpg";
        weekday[14]="resources/img/1.jpg";
        weekday[15]="resources/img/2.jpg";
        weekday[16]="resources/img/2.jpg";
        weekday[17]="resources/img/1.jpg";
        weekday[18]="resources/img/1.jpg";
        weekday[19]="resources/img/1.jpg";
        weekday[20]="resources/img/1.jpg";
    </script>
</head>
<!--<body>改为-->
<body onLoad="initial()">
<div id="dkrs">
    <font color="#9B6E6A" size="5">今日已有<SCRIPT language="JavaScript">
        <!--
        var i=${Num};
        document.write(i);
        //--></SCRIPT>位同事打卡

    </font>
    <div id="tx">
        <script>
            for(var i=0;i<${Num};i++)
            {
                // if(i==8){
                //     document.write("<p></p>");
                // }
                document.write('<img src="'+weekday[i]+'" id="weekimg" />');
                document.write("&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;");

            }
        </script>
    </div>

</div>
<div id="sydk">
    <font  color="#9B6E6A" size="5"><center>今天出勤</center></font>
    <font id="cq" style="font-size:60px;">
        <SCRIPT language="JavaScript">
            <!--
            var i=${Num};
            document.write(i)
            //--></SCRIPT>
    </font>
    <font id="wcq" style="font-size:60px;">
        <SCRIPT language="JavaScript">
            <!--
            var i=${NoNum};
            document.write(i)
            //--></SCRIPT>
    </font>
    <font id="z0">出勤人数</font>
    <font id="z1">未出勤人数</font>
</div>


<div id="dv">
    <div style="display: inline-block;margin-top: 13px">
        <input id="insearchName" type="text" class="typename" placeholder="请输要查询的员工名字"/>
        <input id="insearchDate" type="text" class="typename" placeholder="请输要查询的员工名字"/>
        <img src="resources/img/seach.png" onclick="toSeachDK()" style="height: 30px;width: 30px;vertical-align: middle;">
    </div>

    <div class="fixedTable">
        <table  cellspacing="0"  class="myTable" id="nav_tab"align="center"   >
            <thead>
            <tr id="tr3">
                <th>员工编号</th>
                <th>员工姓名</th>
                <th>打卡时间</th>
            </thead>
            <tbody class="grid" align="center"  >
                <c:forEach items="${list }" var="item">
                    <tr height="60px">
                        <td name="uinfoid">${item.uid }</td>
                        <td name="rname">${item.rname }</td>
                        <td name="gender">${item.datetime }</td>
                    </tr>
                </c:forEach>
            </tbody>
        </table>
    </div>
</div>

</body>
</html>
<script>
    //搜索
    function toSeachDK() {
        var nameEmp=document.getElementById("insearchName").value;
        var dateEmp=document.getElementById("insearchDate").value;

        if(nameEmp!= "" && dateEmp==''){
            window.location.href="attendanceServlet?method=rname_searchFind&rname="+nameEmp;
        }else if(nameEmp == "" && dateEmp!=''){
            window.location.href="wareHouseServlet?method=datetime_searchFind&datetime="+dateEmp;
        }else{
            window.location.href="wareHouseServlet?method=usernaem_uid_datetime&rname="+nameEmp+"&datetime="+dateEmp;
        }

    }
</script>